add docs link for routing peer clarification in ResourcesTable#605
add docs link for routing peer clarification in ResourcesTable#605
Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/modules/networks/resources/ResourcesTable.tsx`:
- Around line 220-229: The InlineLink that opens an external URL using
target="_blank" should include rel="noopener noreferrer" to prevent
window.opener access and referrer leakage; update the InlineLink instance in
ResourcesTable (the InlineLink wrapping "Trying to access resources on the
routing peer?" and containing ExternalLinkIcon) to add rel="noopener noreferrer"
whenever target="_blank" is used.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ea800cc3-9441-4cd8-b9d0-c3f4244f83b8
📒 Files selected for processing (1)
src/modules/networks/resources/ResourcesTable.tsx
| <InlineLink | ||
| href={ | ||
| "https://docs.netbird.io/manage/networks#manage-access-to-routing-peer" | ||
| } | ||
| target={"_blank"} | ||
| className={"text-xs whitespace-nowrap"} | ||
| > | ||
| Trying to access resources on the routing peer? | ||
| <ExternalLinkIcon size={12} /> | ||
| </InlineLink> |
There was a problem hiding this comment.
Add rel="noopener noreferrer" for external link security hardening.
The InlineLink component does not automatically inject rel attributes. When using target="_blank" with external URLs, explicitly adding rel="noopener noreferrer" is recommended to prevent the opened page from accessing window.opener and to avoid referrer leakage.
🛡️ Proposed fix
<InlineLink
href={
"https://docs.netbird.io/manage/networks#manage-access-to-routing-peer"
}
target={"_blank"}
+ rel={"noopener noreferrer"}
className={"text-xs whitespace-nowrap"}
>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <InlineLink | |
| href={ | |
| "https://docs.netbird.io/manage/networks#manage-access-to-routing-peer" | |
| } | |
| target={"_blank"} | |
| className={"text-xs whitespace-nowrap"} | |
| > | |
| Trying to access resources on the routing peer? | |
| <ExternalLinkIcon size={12} /> | |
| </InlineLink> | |
| <InlineLink | |
| href={ | |
| "https://docs.netbird.io/manage/networks#manage-access-to-routing-peer" | |
| } | |
| target={"_blank"} | |
| rel={"noopener noreferrer"} | |
| className={"text-xs whitespace-nowrap"} | |
| > | |
| Trying to access resources on the routing peer? | |
| <ExternalLinkIcon size={12} /> | |
| </InlineLink> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/modules/networks/resources/ResourcesTable.tsx` around lines 220 - 229,
The InlineLink that opens an external URL using target="_blank" should include
rel="noopener noreferrer" to prevent window.opener access and referrer leakage;
update the InlineLink instance in ResourcesTable (the InlineLink wrapping
"Trying to access resources on the routing peer?" and containing
ExternalLinkIcon) to add rel="noopener noreferrer" whenever target="_blank" is
used.
Issue ticket number and link
Documentation
Select exactly one:
Docs PR URL (required if "docs added" is checked)
Paste the PR link from https://github.com/netbirdio/docs here:
netbirdio/docs#689
Summary by CodeRabbit